import type { FC } from 'react';
import { Avatar } from 'antd';
import type { AvatarProps } from 'antd';

interface Props extends AvatarProps {
  staffName: string;
}

const TMEAvatar: FC<Props> = ({ staffName, ...restProps }) => (
  <Avatar
    src={`http://tpp.tmeoa.com/photo/48/${staffName}.png`}
    alt="avatar"
    icon={<img src="http://dayu.oa.com/avatars/avatar.gif" />}
    {...restProps}
  ></Avatar>
);

export default TMEAvatar;
